//
//  LQYLoginBassController.m
//  BuDeJie
//
//  Created by runone02 on 2018/6/15.
//  Copyright © 2018年 李启云. All rights reserved.
//

#import "LQYLoginBassController.h"
#import "LQYPasswordLoginController.h"
#import "LQYQuickLogonController.h"
@interface LQYLoginBassController ()
@property (nonatomic, strong) UIView *viewload;
@end

@implementation LQYLoginBassController


- (instancetype)init{
    if (self = [super init]) {
        self.titleColorSelected = [UIColor orangeColor];
        self.menuItemWidth = LQYScreenW / 2.0;
        self.menuViewStyle = WMMenuViewStyleLine;
        self.progressHeight = 3;
        
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"登录管理";
}

//返回左右侧滑两个控制器
- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController{
    return 2;
}

//添加控制器
- (__kindof UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index{
    //快速登录
    LQYQuickLogonController *tollListVC = [[LQYQuickLogonController alloc] init];
    //密码登录
    LQYPasswordLoginController *dataVC = [[LQYPasswordLoginController alloc] init];
    
    switch (index) {
        case 0: return tollListVC ;
        case 1: return dataVC;
    }
    return [[UIViewController alloc] init];
}

//标题名
- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index{
    switch (index ) {
        case 0: return @"快速登录";
        case 1: return @"密码登录";
    }
    return @"NONE";
}

- (CGRect)pageController:(WMPageController *)pageController preferredFrameForMenuView:(WMMenuView *)menuView{
    CGRect menuViewFrame = CGRectMake(0, kTopBarHeight, LQYScreenW, 50.0);
    return menuViewFrame;
}


- (CGRect)pageController:(WMPageController *)pageController preferredFrameForContentView:(WMScrollView *)contentView {
        return CGRectMake(0, kTopBarHeight, self.view.frame.size.width, self.view.frame.size.height - kTopBarHeight - 44);
}
@end
